package com.qf.boot1.entity;

import cn.hutool.crypto.digest.DigestUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName customer
 */
public class Customer implements Serializable {
    /**
     *
     */
    private Integer id;

    /**
     *
     */
    private String name;

    /**
     *
     */
    private String password;

    /**
     *
     */
    private String sex;

    /**
     *
     */
    private Date date;

    /**
     *
     */
    private Date registTime;

    /**
     *
     */
    private String photopath;

    private static final long serialVersionUID = 1L;

    public Customer(Integer id, String name, String password, String sex, Date date, Date registtime) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.sex = sex;
        this.date = date;
        this.registTime = registtime;
    }

    public Customer(String name, String password, String sex, Date date, Date registtime) {
        this.name = name;
        this.password = password;
        this.sex = sex;
        this.date = date;
        this.registTime = registtime;
    }

    public Customer(String name, String sex, Date date) {
        this.name = name;
        this.sex = sex;
        this.date = date;
    }

    public Customer() {
    }

    public Customer(Integer id, String name, String password, String sex, Date date, Date registtime, String photopath) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.sex = sex;
        this.date = date;
        this.registTime = registtime;
        this.photopath = photopath;
    }

    public Customer(String name, String password, String sex, Date date, Date registtime, String photopath) {
        this.name = name;
        this.password = password;
        this.sex = sex;
        this.date = date;
        this.registTime = registtime;
        this.photopath = photopath;
    }

    /**
     *
     */
    public Integer getId() {
        return id;
    }

    /**
     *
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     *
     */
    public String getName() {
        return name;
    }

    /**
     *
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     *
     */
    public String getPassword() {
        return password;
    }

    /**
     *
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     *
     */
    public String getSex() {
        return sex;
    }

    /**
     *
     */
    public void setSex(String sex) {
        this.sex = sex;
    }

    /**
     *
     */
    public Date getDate() {
        return date;
    }

    /**
     *
     */
    public void setDate(Date date) {
        this.date = date;
    }

    /**
     *
     */
    public Date getRegisttime() {
        return registTime;
    }

    /**
     *
     */
    public void setRegisttime(Date registtime) {
        this.registTime = registtime;
    }

    /**
     *
     */
    public String getPhotopath() {
        return photopath;
    }

    /**
     *
     */
    public void setPhotopath(String photopath) {
        this.photopath = photopath;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customer other = (Customer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
                && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
                && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
                && (this.getRegisttime() == null ? other.getRegisttime() == null : this.getRegisttime().equals(other.getRegisttime()))
                && (this.getPhotopath() == null ? other.getPhotopath() == null : this.getPhotopath().equals(other.getPhotopath()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getRegisttime() == null) ? 0 : getRegisttime().hashCode());
        result = prime * result + ((getPhotopath() == null) ? 0 : getPhotopath().hashCode());
        return result;
    }

}